package com.gxa.learning.portal.mapper;

import com.gxa.learning.core.pojo.ProjectDetails;
import com.gxa.learning.core.pojo.ProjectSign;
import tk.mybatis.mapper.common.Mapper;

import java.util.Map;

/**
 * @version E-learning
 * @Author lonny
 * @Date 2021/12/14 18:55
 */
public interface SignInMapper extends Mapper<ProjectSign> {

    /**
     * 判断是否签到
     *
     * @param userId    用户
     * @param projectId 培训
     * @param courseId  课程
     * @return Map<String, Object>
     */
    Map<String, Object> isSingIn(Long userId, Long projectId, Integer courseId);

    /**
     * 修改
     *
     * @param projectSign projectSign
     * @return Integer
     */
    Integer update(ProjectSign projectSign);

    /**
     * 通过用户和培训 查询反馈情况
     *
     * @param userId    用户
     * @param projectId 培训
     * @param courseId  培训
     * @return 返回
     */
    Map<String, Object> findByUserAndProject(Long userId, Long projectId, Integer courseId);

    /**
     * 课程评分
     *
     * @param courseId 课程
     * @return Map
     */
    Map<String, Object> courseNum(String courseId);

    /**
     * 查询项目详情
     *
     * @param id 项目
     * @return Map
     */
    Map<String, Object> getById(String id);

}

